home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / Alpha ƒ / Tcl / SystemCode / rebuildAlphaTcl.tcl < prev    next >
Encoding:
Text File  |  2000-10-16  |  1.6 KB  |  45 lines

  1. # if configuration has changed, rebuild indices
  2. if {$err || ([catch {alpha::checkConfiguration} err] || ($err == 1))} {
  3.     alertnote "You have recently installed or upgraded Alpha,\
  4.       or installed/removed one of its packages. \
  5.       This means I have to rebuild the index of all\
  6.       packages, which will take a little while."
  7.     # For safety's sake:
  8.     source [file join $HOME Tcl SystemCode CorePackages cache.tcl]
  9.     source [file join $HOME Tcl SystemCode CorePackages fileManipulation.tcl]
  10.     source [file join $HOME Tcl SystemCode stringsLists.tcl]
  11.     source [file join $HOME Tcl SystemCode modes.tcl]
  12.     source [file join $HOME Tcl SystemCode package.tcl]
  13.     source [file join $HOME Tcl SystemCode CorePackages error.tcl]
  14.     if {[info tclversion] < 8.0} {
  15.     # so 'file volumes/pathtype' works.  Commented out now, because we
  16.     # shouldn't need 'file volumes/pathtype' any more.
  17.     # source [file join $HOME Tcl SystemCode CorePackages aemain.tcl]
  18.     }
  19.     # power-user can use 'option' to avoid the rebuild
  20.     if {!([getModifiers] & 72)} {
  21.     if {[catch {alpha::makeIndices} err]} {
  22.         alertnote "There was a bad problem while making the package indices."
  23.         alertnote $err
  24.         error $err
  25.     }
  26.     if {[catch {rebuildTclIndices} err]} {
  27.         alertnote "There was a bad problem while making the tcl indices."
  28.         alertnote $err
  29.         error $err
  30.     }
  31.     # For debugging
  32.     #listpick $auto_path
  33.     }
  34. }
  35. unset err
  36.  
  37. if {[alpha::package vcompare ${alpha::version} 7.2d1] < 0} {
  38.     alertnote "This version of Alpha is too old.\
  39.       Upgrade from\
  40.       http://alpha.olm.net/ or\
  41.       ftp://ftp.ucsd.edu/pub/alpha/ \
  42.       \r\rI'll quit now."
  43.     quit
  44. }
  45.